package com.qfedu.mapper;

import com.qfedu.model.Project;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author LiJH
 * @date 2023-02-09
 */

public interface ProjectMapper {
    @Select("select count(*) from project where status=1")
    long count();

    @Select("select * from project where status=1 limit #{currentPage},#{pageSize}")
    List<Project> findPage(@Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize);

    @Select("select * from project where status=1")
    List<Project> findAll();
}